import request from '@/utils/request'

// 查询能源介质能耗统计列表
export function listMedium(query) {
  return request({
    url: '/energy/medium/list',
    method: 'get',
    params: query
  })
}

// 查询能源介质能耗统计列表(分页)
export function pageMedium(query) {
  return request({
    url: '/energy/medium/page',
    method: 'get',
    params: query
  })
}

// 查询能源介质能耗统计详细
export function getMedium(id) {
  return request({
    url: '/energy/medium/get/' + id,
    method: 'get'
  })
}

// 新增能源介质能耗统计
export function addMedium(data) {
  return request({
    url: '/energy/medium/add',
    method: 'post',
    data: data
  })
}

// 修改能源介质能耗统计
export function updateMedium(data) {
  return request({
    url: '/energy/medium/edit',
    method: 'post',
    data: data
  })
}

// 删除能源介质能耗统计
export function delMedium(id) {
  return request({
    url: '/energy/medium/remove/' + id,
    method: 'post'
  })
}
  // 获取能源实时信息
  export function getRealTimeInfo(query) {
    return request({
      url: '/energy/medium/getRealTimeInfo',
      method: 'get',
      params: query
    })
  }
// 获取能源折线图信息
  export function getEnergyChartAll(query) {
    return request({
      url: '/energy/medium/getEnergyChartAll',
      method: 'get',
      params: query
    })
  }
// 查询能源历史表
  export function getEnergyHistory(query) {
    return request({
      url: '/energy/medium/getEnergyHistory',
      method: 'get',
      params: query
    })
  }
// 导出能源历史表
  export function exportEnergyHistory(query) {
    return request({
      url: '/energy/medium/exportEnergyHistory',
      method: 'get',
      params: query
    })
  }

